package com.dykj.fireFighting.server.base.emergency.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dykj.fireFighting.api.base.emergency.entity.EmergencyPlanTwo;
import com.dykj.fireFighting.api.base.emergency.vo.EmergencyPlanTwoVo;
import com.dykj.fireFighting.api.base.emergency.vo.EmergencyTypeMonthVo;
import com.dykj.fireFighting.api.base.emergency.vo.EmergencyTypeUnitVo;
import com.dykj.fireFighting.api.base.emergency.vo.EmergencyPlanTwoVo;
import com.dykj.fireFighting.common.core.mapper.SuperMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import java.util.Map;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * @Description 应急预案新版
 * @Author JacksonTu
 * @Date 2021-08-26 14:40:38
 */
public interface EmergencyPlanTwoMapper extends SuperMapper<EmergencyPlanTwo> {
     List<EmergencyPlanTwo> rankScore(@Param("start") String start,
                                             @Param("end") String end, @Param("type")String type,@Param("shudi") String shudi,
                                             @Param("unitList")List<String> unitList);
    @Select("select * from emergency_plan_two where building_id=#{id}")
    EmergencyPlanTwo SelectInfoByBuildingId(String id);

    List<EmergencyTypeUnitVo> typeUnit(@Param("start") String start,
                                       @Param("end") String end, @Param("type")String type, @Param("shudi") String shudi,
                                       @Param("unitList")List<String> unitList);

    List<EmergencyTypeMonthVo> typeMonth(@Param("start") String start,
                                         @Param("end") String end, @Param("type")String type, @Param("shudi") String shudi,
                                         @Param("unitList")List<String> unitList);

    /**
     * 应急预案新版分页列表
     *
     * @param page
     * @param params
     * @return
     */
    IPage<EmergencyPlanTwoVo> queryList(Page page, @Param("params") Map<String, Object> params);

    EmergencyPlanTwo getInfoById(String id);
}
